home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / util / rexx / supspjo.lha / supersplitz.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1997-09-15  |  1.6 KB  |  55 lines

  1. /* Title    Splitz                        */
  2. /* Author   Paul Clough                   */
  3. /* version  1.1                           */
  4. /* date     19/4/96                       */
  5. /* lastdate 15/9/97 easy install          */
  6. /* Email    ca5pcl@isis.sunderland.ac.uk  */
  7.  
  8. /* Full Path and filename as argrument */
  9.  
  10. Parse arg SourceFileName DirectoryName
  11.  
  12. /* Exit the program if blank argruments */
  13.  
  14. If arg(1)='' then exit()
  15.  
  16. /* information on the system program run in */
  17.  
  18. PARSE SOURCE CallType ResStr TheCall StorePath FileExt HostSystem
  19.  
  20. /* String to call "Splitz" as same directory as SuperSplitz.rexx */
  21.  
  22. StorePath='"'left(StorePath,lastpos('/',StorePath))'Splitz"'
  23.  
  24. /* Create DeFilename from SourceFileName */
  25.  
  26. IF  LastPos('/',SourceFileName)>0 then
  27.   DeFileName=substr(SourceFileName,(1+lastpos('/',SourceFileName)),(length(SourceFileName)-lastpos('/',SourceFileName)))
  28.  Else
  29.   DeFileName=substr(SourceFileName,(1+lastpos(':',SourceFileName)),(length(SourceFileName)-lastpos(':',SourceFileName)))
  30.  
  31. /* This set up FileName Max length */
  32.  
  33. If length(DeFileName)>16 then DeFileName=substr(DeFileName,1,16)
  34.  
  35. /* Add Speech mark for Filename with spaces in them */
  36.  
  37. SourceFileName='"'SourceFileName'"'
  38.  
  39. /* Find Out the Disk Size capture */
  40.  
  41. SizeOfFile=840000
  42.  
  43. /* Set up des directory */
  44. If DirectoryName>'' then DirectoryName=substr(DirectoryName,1,length(DirectoryName)-1)
  45. DirectoryName='"'DirectoryName || DeFileName'"'
  46.  
  47. /* Address DOS commands */
  48.  
  49. address command
  50.  
  51. /* Execute the splitz program with parament */
  52.  
  53. StorePath SourceFileName DirectoryName SizeOfFile
  54.  
  55. say('This real name is 'SourceFileName' split filename is 'DeFileName)